/*! \file motor1.cpp

\brief DC motor model number 1

Date of creation: 2010-15-11

Copyright
Julian David Colorado, jd.colorado@upm.es
Universidad Politecnica de Madrid

See the file "license.terms" for information on usage and redistribution of this file, and for a
DISCLAIMER OF ALL WARRANTIES.
*/


/*
INPUT
\param MAT SimParam: Simulation Parameters 4 x 6
\param double u: Control action
\param int i: Time flag

OUTPUT
\param double X: control action

*/
#include "../../dynlib.h"

double dcmotors(Matrix &SimParam,double u,Matrix &X,int i)
{
	/*motor1(Ka,Ta,u,vel):
	Ka=SimParam[2,1]
	Ta=SimParam[2,2]*/	
	//Ka/Ta*u-vel/Ta
	return SimParam(2,1)/SimParam(2,2)*u-X(3,i)/SimParam(2,2);
}
